package com.mj.listen1._06二叉搜索树的重构;

import com.mj.listen1._06二叉搜索树的重构.printer.BinaryTrees;
import com.mj.listen1._06二叉搜索树的重构.tree.BinarySearchTree;

public class Main {
    // 测试删除完全二叉树
    static void test10() {
        Integer[] integer = new Integer[]{
                7, 4, 9, 2, 5, 8, 11, 3, 13
        };

        BinarySearchTree<Integer> tree = new BinarySearchTree<>();
        for (int i = 0; i < integer.length; i++) {
            tree.add(integer[i]);
        }

        BinaryTrees.println(tree);

        // 删除
        tree.remove(9);
        tree.remove(4);


        BinaryTrees.println(tree);
    }

    public static void main(String[] args) {
        test10();
    }
}
